package com.kuang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class EcondControllero1 {
    @RequestMapping("/e/t")
    public String test(Model model,String name){
        model.addAttribute("msg",name); //获取表单提交的值
        System.out.println(name);
        return "form"; //跳转到test页面显示输入的值
    }
}
//个人理解：这里return到test.jsp页面，也可以相当于转发到test.jsp页面

